package org.stone926.airschool.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.stone926.airschool.bean.Student;
import org.stone926.airschool.service.StudentService;

@Controller
@RequestMapping("/student")
public class StudentController {

	@Autowired
	private StudentService studentService;

	@ResponseBody
	@RequestMapping("/{id}")
	public Student getStudentById(@PathVariable("id") Integer sid) {
		return studentService.getStudentById(sid);
	}

//	@ResponseBody
//	@RequestMapping(value = "/{id}", method = RequestMethod.PUT)
//	public int updateStudent(Student student) {
//		return 0;
//
//	}
}
